This invention relates generally to data processing systems and, more particularly, to a method and system for creating associations between parameters of a container application program and corresponding parameter of a contained object.
The operation of a computer system is controlled by a computer program or group of programs called the operating system (xe2x80x9cOSxe2x80x9d). In early operating systems, a computer user input text commands to the OS using a command line interface. Later, more advanced operating systems were developed which utilized a graphical user interface (xe2x80x9cGUIxe2x80x9d) in combination with an input device such as a mouse. In GUIs, the input device controls a display cursor to allow for the selection of data and resources for application program operations. A user selects an operation by highlighting an item or field and pressing a graphical input device button.
Many GUI programs are implemented in object-oriented programming languages, such as the C++ programming language. The display icons that represent data or resources are typically representations of data structures called objects, which encapsulate attributes and behaviors. Objects are specified by definitions, called classes, that specify the attributes and behaviors of the particular objects, which are termed xe2x80x9cinstantiationsxe2x80x9d of the class definitions. The reference Budd, T., xe2x80x9cAn Introduction to Object-Oriented Programmingxe2x80x9d, Addison-Wesley Publishing Co., Inc. 1991, provides an introduction to object-oriented concepts and terminology.
Object-oriented programming languages make it easier for system programmers to implement the GUI concepts of icons and lists. For example, if the GUI icons are represented as object-oriented programming objects, the GUI program can be written so that the status of the icon is continuously updated. In this way, it is relatively simple for the GUI program to be written so that the icons can be selected with the graphical user input device and moved about on the computer system display as desired.
With the advent of object-oriented GUIs also came object oriented developing environments. Such development environments are computer programs or groups of computer programs that allow a software developer to create object oriented programs. Object-oriented development environments typically have a palette of objects with which the developer builds an application. Each object on this palette is different and serves as a template for the developer. A palette object""s attribute settings are the default settings for that object. To use an object on the palette, the developer copies the object and places the copy on the application. The copied or xe2x80x9cderivedxe2x80x9d object has the same attribute settings as the original palette object.
Efforts have been made to establish a common method of communication between objects instantiated within a given operating system environment. For example, Microsoft Corporation has established a certain protocol, known as the Component Object Model, which governs the interaction between software objects within the Microsoft Windows operating environment. COM provides a standard framework permitting objects from different applications to share data and functions, and permits a given application program (xe2x80x9ccontainer applicationxe2x80x9d) to contain multiple objects of different types. Recently, a format for control objects known as xe2x80x9cActiveXxe2x80x9d has been established to take advantage of the COM protocol. An ActiveX object behaves as a xe2x80x9cserverxe2x80x9d relative to its container application, which in turn behaves as a xe2x80x9cclientxe2x80x9d. The COM protocol manages, among other things, the setup and initialization necessary for container applications to send and receive messages and data to and from server applications.
An ActiveX control is an object which typically includes data and functions, and which is capable of notifying its container application of the occurrence of an event. In the context of an ActiveX control, stored data members are known as xe2x80x9cpropertiesxe2x80x9d, functions are referred to as xe2x80x9cmethodsxe2x80x9d, and event occurrences are denoted as xe2x80x9ceventsxe2x80x9d. Properties can be read from, and written to, an ActiveX control via associated methods. The interface of an ActiveX control is a set of methods defining certain input, output and behavior rules. Accordingly, a container application can invoke the methods of an ActiveX control to effect the defined behavior and access the object data.
In addition to representing data stored by an ActiveX control, properties are used in formatting the display of an ActiveX control. Events are utilized to notify a container application of the occurrence of an event, as well as to pass parameters relevant to the particular event. For example, an ActiveX control is capable of informing its container application of the occurrence of a selection event (e.g., when the user interface of the control has been xe2x80x9cclicked onxe2x80x9d).
ActiveX objects are typically implemented: (i) as in-process servers, or (ii) as out-of-process servers. In the former case the ActiveX control is implemented as a Dynamic Link Library (xe2x80x9cDLLxe2x80x9d), and in the latter case as an xe2x80x9cexecutablexe2x80x9d. ActiveX DLL""s are loaded into the process space of the container application. As a consequence, data does not need to be transported between the container application and the ActiveX control. In contrast, ActiveX executables are loaded into a separate process space from the container application. Since there is no shared memory between such applications, data is transported between ActiveX objects and the container application. This is advantageous in the sense that an ActiveX executable does not interfere with the processing of data in the client application.
Although a number of programming environments exist for facilitating development of Active X controls, as object-oriented constructs each such ActiveX control operates independently of the container application. That is, Active X controls are conventionally installed in container applications so as not to be affected by changes in parameters of the container application, and vice versa. Similarly, the occurrence of ActiveX events does not automatically cause the execution of scripts or the like in the container application. Although such relationships between the properties and events of an ActiveX control and a container application could conceivably be established on an ad hoc basis, there has not heretofore been a convenient mechanism for linking such properties and events with associated parameters of container applications.
Briefly, the present invention provides a system and method for establishing associative relationships between properties of a contained object and corresponding parameters of a container application. The present system contemplates the establishment of both mutual and unilateral associative relationships, with a particular relationship being specified via a user interface created upon instantiation of the contained object. It is a feature of the present invention that such associative relationships may be established without modification of the code comprising the contained object.
In one aspect the present invention facilitates implementation of selected functionality of a container application prescribed by an event script. In an initial step an association is created between an event arising within a contained object instantiated in a computing environment and a script associated with the container application. In a preferred implementation this association is recorded in an event sink of a control site serving the container application. An event indication is generated in response to occurrence of a particular event within the contained object. In response, the event script is invoked and a sequence of script commands corresponding to the selected functionality are carried out.
In another aspect the present invention provides a system and method for creating an association between a tag source of a container application and a property of a contained object. Specifically, an associative relationship is defined between said tag source and the property, such associative relationship being determinative of the extent to which changes in the tag source and property will induce corresponding changes in the other. This associative relationship is recorded within a property sink of a control site for the container application, and may be specified by a user upon instantiation of the contained object. Depending upon the nature of the tag source, various unilateral and mutual associative relationships may be established. For example, in certain instances a unilateral associative relationship may be specified such that changes in the tag source are reflected as corresponding changes in the property, while changes in the property are not permitted to affect the tag source. In other cases the converse unilateral associative relationship, or a mutual associative relationship, may also be specified.